package com.best.oasis.settlement.web.action.security;

import java.security.Principal;
import java.util.List;

import com.best.oasis.settlement.common.entity.security.User;
import com.best.oasis.settlement.common.so.security.UserSO;
import com.best.oasis.settlement.common.vo.security.SelectedRoleGroupVO;
import com.best.oasis.settlement.common.vo.security.UserInfoFromLdapServerVO;
import com.best.oasis.settlement.common.vo.security.UserVO;
import com.best.oasis.settlement.util.page.PageList;
import com.best.oasis.settlement.web.action.base.BaseAction;

public interface UserAction extends BaseAction<UserVO, User> {

    public Principal doAuthentication(String username, String password);

    /**
     * {@inheritDoc}
     */
    public boolean logout(Principal principal);

    /**
     * 用户管理模块中，用来记录当前用户被选中的用户组
     */
    public List<SelectedRoleGroupVO> getSelectedRoleGroup(Long id);

    /**
     * 从LdapServer获得用户信息
     * 
     * @throws Exception
     */
    public UserInfoFromLdapServerVO getUserInfoFromLdapServer(String username) throws Exception;

    /**
     * 获得当前登录用户信息
     */
    public UserVO getLoginUser();

    /**
     * 修改密码
     */
    public String updatePassword(String oldPassword, String newPassword);

    public void removeUserprofile(List<Long> userIds);

    /**
     * 根据so进行搜索T的对象，返回可以翻页的对象列表
     * 
     * @param so
     * @return
     */
    public PageList<UserVO> getUserPageList(UserSO so);

    /**
     * 判断登录名是否存在
     */
    public Boolean userNameExist(String userName);
    /**
	 * 密码重置
	 */
    public UserVO resetPassword( UserVO user );
}
